home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0" encoding="utf-8"?> <html><head><title>TypeName Function; VarType Function[Runtime]</title><meta name="filename" content="text/sbasic/common/03103600"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css"> table.Tabelle1{ } span.Tabelle1A{ width:6.001cm;} td.Tabelle1B2{ } p.P1{ } span.T1{ font-weight:bold;} </style></head><body> <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="typename" xmlns:help="http://openoffice.org/2000/help"> <p class="Head1"><help:paragraphinfo state="U" number="1"/><help:key-word value="TypeName; function" tag="kw66391_1"/><help:link Id="66391">TypeName Function; VarType Function[Runtime]</help:link></p> <p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Returns a string (TypeName) or a numeric value (VarType) that contains information for a variable.</p> <help:paragraphinfo state="E"/></help:to-be-embedded> <p class="Head2"><help:paragraphinfo state="U" number="3" xmlns:help="http://openoffice.org/2000/help"/>Syntax:</p> <p class="Paragraph"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/>TypeName (Variable)VarType (Variable)</p> <p class="Head2"><help:paragraphinfo state="U" number="5" xmlns:help="http://openoffice.org/2000/help"/>Return value:</p> <p class="Paragraph"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/>String; Integer</p> <p class="Head2"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>Parameters:</p> <p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Variable:</span> The variable that you want to determine the type of. You can use the following values:</p> <table><tr class=""><th style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>key word</p> </span></th><th style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/>VarType</p> </span></th><th style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/>Variable type</p> </span></th></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/>Boolean</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/>11</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="14" xmlns:help="http://openoffice.org/2000/help"/>Boolean variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="15" xmlns:help="http://openoffice.org/2000/help"/>Date</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="16" xmlns:help="http://openoffice.org/2000/help"/>7</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="17" xmlns:help="http://openoffice.org/2000/help"/>Date variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="18" xmlns:help="http://openoffice.org/2000/help"/>Double</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="19" xmlns:help="http://openoffice.org/2000/help"/>5</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="20" xmlns:help="http://openoffice.org/2000/help"/>Double floating point variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="21" xmlns:help="http://openoffice.org/2000/help"/>Integer</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>2</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>Integer variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="24" xmlns:help="http://openoffice.org/2000/help"/>Long</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="25" xmlns:help="http://openoffice.org/2000/help"/>3</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="26" xmlns:help="http://openoffice.org/2000/help"/>Long integer variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="27" xmlns:help="http://openoffice.org/2000/help"/>Object</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="28" xmlns:help="http://openoffice.org/2000/help"/>9</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="29" xmlns:help="http://openoffice.org/2000/help"/>Object variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="30" xmlns:help="http://openoffice.org/2000/help"/>Single</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="31" xmlns:help="http://openoffice.org/2000/help"/>4</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="32" xmlns:help="http://openoffice.org/2000/help"/>Single floating-point variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="33" xmlns:help="http://openoffice.org/2000/help"/>String</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="34" xmlns:help="http://openoffice.org/2000/help"/>8</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="35" xmlns:help="http://openoffice.org/2000/help"/>String variable</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="36" xmlns:help="http://openoffice.org/2000/help"/>Variant</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="37" xmlns:help="http://openoffice.org/2000/help"/>12</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="38" xmlns:help="http://openoffice.org/2000/help"/>Variant variable (can contain all types specified by the definition)</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="39" xmlns:help="http://openoffice.org/2000/help"/>Empty</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="40" xmlns:help="http://openoffice.org/2000/help"/>0</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="41" xmlns:help="http://openoffice.org/2000/help"/>Variable is not initialized</p> </span></td></tr><tr class=""><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="42" xmlns:help="http://openoffice.org/2000/help"/>Null</p> </span></td><td class="Tabelle1B2" style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="43" xmlns:help="http://openoffice.org/2000/help"/>1</p> </span></td><td style="text-align:left;"><span class="Tabelle1A"> <p class="TextInTable"><help:paragraphinfo state="U" number="44" xmlns:help="http://openoffice.org/2000/help"/>No valid data</p> </span></td></tr></table> <p class="Paragraph"><help:paragraphinfo state="S" xmlns:help="http://openoffice.org/2000/help"/><help:embedded Id="66475" Eid="errorcode" xmlns:help="http://openoffice.org/2000/help"/></p> <p class="Paragraph"><help:paragraphinfo state="S" xmlns:help="http://openoffice.org/2000/help"/><help:embedded Id="66475" Eid="err5" xmlns:help="http://openoffice.org/2000/help"/></p> <p class="Head2"><help:paragraphinfo state="U" number="45" xmlns:help="http://openoffice.org/2000/help"/>Example:</p> <p class="PropText"><help:paragraphinfo state="U" number="46" xmlns:help="http://openoffice.org/2000/help"/>Sub ExampleType</p> <p class="PropText"><help:paragraphinfo state="U" number="47" xmlns:help="http://openoffice.org/2000/help"/>Dim iVar As Integer</p> <p class="PropText"><help:paragraphinfo state="U" number="48" xmlns:help="http://openoffice.org/2000/help"/>Dim sVar As String</p> <p class="PropText"><help:paragraphinfo state="U" number="49" xmlns:help="http://openoffice.org/2000/help"/>Dim siVar As Single</p> <p class="PropText"><help:paragraphinfo state="U" number="50" xmlns:help="http://openoffice.org/2000/help"/>Dim dVar As Double</p> <p class="PropText"><help:paragraphinfo state="U" number="51" xmlns:help="http://openoffice.org/2000/help"/>Dim bVar As Boolean</p> <p class="PropText"><help:paragraphinfo state="U" number="52" xmlns:help="http://openoffice.org/2000/help"/>Dim lVar As Long</p> <p class="PropText"><help:paragraphinfo state="U" number="53" xmlns:help="http://openoffice.org/2000/help"/>Msgbox TypeName(iVar) & " " & VarType(iVar) & Chr(13) &_</p> <p class="PropText"><help:paragraphinfo state="U" number="54" xmlns:help="http://openoffice.org/2000/help"/>TypeName(sVar) & " " & VarType(dVar) & Chr(13) &_</p> <p class="PropText"><help:paragraphinfo state="U" number="55" xmlns:help="http://openoffice.org/2000/help"/>TypeName(siVar) & " " & VarType(siVar) & Chr(13) &_</p> <p class="PropText"><help:paragraphinfo state="U" number="56" xmlns:help="http://openoffice.org/2000/help"/>TypeName(dVar) & " " & VarType(dVar) & Chr(13) &_</p> <p class="PropText"><help:paragraphinfo state="U" number="57" xmlns:help="http://openoffice.org/2000/help"/>TypeName(bVar) & " " & VarType(bVar) & Chr(13) &_</p> <p class="PropText"><help:paragraphinfo state="U" number="58" xmlns:help="http://openoffice.org/2000/help"/>TypeName(lVar) & " " & VarType(lVar),0,"Some types in <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> Basic"</p> <p class="PropText"><help:paragraphinfo state="U" number="59" xmlns:help="http://openoffice.org/2000/help"/>end Sub</p> </body></html>